home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 #2 / Ham Radio 2000 - Volume 2.iso / HAMV2 / TCP_IP / TNOS230S / UNIXASY.H < prev    next >
Encoding:
C/C++ Source or Header  |  1997-07-30  |  1.7 KB  |  56 lines

  1. /* Various I/O definitions specific to asynch I/O on Unix */
  2. #ifndef    _UNIXASY_H
  3. #define    _UNIXASY_H
  4.  
  5. #ifndef    _MBUF_H
  6. #include "mbuf.h"
  7. #endif
  8.  
  9. #ifndef _PROC_H
  10. #include "proc.h"
  11. #endif
  12.  
  13. #ifndef    _IFACE_H
  14. #include "iface.h"
  15. #endif
  16.  
  17. /* Asynch controller control block */
  18. struct asy
  19. {
  20.     struct iface *iface;
  21.     struct mbuf *sndq;        /* Transmit queue */
  22.     struct mbuf *rcvq;        /* Receive queue */
  23.     struct proc *rxproc;    /* Low-level receive process */
  24.     int fd;            /* Fildes for tty device */
  25.     char uulock[60];        /* UUCP lock file name */
  26.     long speed;            /* port speed */
  27.     unsigned short flags;    /* various flags */
  28. #define ASY_RTSCTS    0x01    /*   RTS/CTS enabled */
  29. #if 0
  30. #define ASY_CARR    0x02    /*   DCD detection (not implemented) */
  31. #endif
  32.     unsigned char pktsize;    /* nonblocking or termios VMIN (blocking) */
  33.     unsigned long rxints;    /* simulated rx interrupts */
  34.     unsigned long txints;    /* simulated tx interrupts */
  35.     unsigned long rxchar;    /* Received characters */
  36.     unsigned long txchar;    /* Transmitted characters */
  37. /* new parameters for asy tuning */
  38.     unsigned rxbuf;        /* chars to read at once */
  39.     int rxq;            /* number of reads before sleeping */
  40.     int txq;            /* number of writes before sleeping */
  41. /* new status values */
  42.     long rxput;            /* number of puts to asy rx */
  43.     long rxovq;            /* number of times rxq full */
  44.     long rxblock;        /* number of false (EWOULDBLOCK) reads */
  45.     long txget;            /* number of gets from tx queue */
  46.     long txovq;            /* number of times txq full */
  47.     long txblock;        /* number of EWOULDBLOCK writes */
  48.     struct proc *poller;    /* G8BPQ poll process */
  49. };
  50.  
  51. extern struct asy *Asy;
  52.  
  53. extern int carrier_detect (int);
  54.  
  55. #endif    /* _UNIXASY_H */
  56.